import React from "react"
import Icon from "@ant-design/icons"

const RectangleFailIconSvg = () => (
    <svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'>
        <path d='M4 24H24L0 0V20C0 22.2091 1.79086 24 4 24Z' fill='#F4736B' />
    </svg>
)
export const RectangleFailIcon: React.FC = (props: any) => {
    return <Icon component={RectangleFailIconSvg} {...props} />
}

const RectangleSucceeIconSvg = () => (
    <svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'>
        <path d='M4 24H24L0 0V20C0 22.2091 1.79086 24 4 24Z' fill='#29BCD0' />
    </svg>
)

export const RectangleSucceeIcon: React.FC = (props: any) => {
    return <Icon component={RectangleSucceeIconSvg} {...props} />
}

const UnionIconSvg = () => (
    <svg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 19 19' fill='none'>
        <path
            opacity='0.5'
            fillRule='evenodd'
            clipRule='evenodd'
            d='M0.437018 12.1355C-0.839372 7.3719 2.00068 2.45278 6.76424 1.17639C11.5278 -0.100003 16.4469 2.74006 17.7233 7.50361C18.9997 12.2672 16.1596 17.1863 11.3961 18.4627C6.63253 19.7391 1.71341 16.899 0.437018 12.1355ZM1.55015 11.8372C2.66205 15.9869 6.94813 18.4615 11.0978 17.3495C15.2475 16.2376 17.7221 11.9516 16.6102 7.80187C15.4983 3.65218 11.2122 1.17761 7.0625 2.28952C2.91281 3.40143 0.43824 7.6875 1.55015 11.8372ZM5.13257 5.1051L5.38618 5.39681L5.22585 5.51873L4.48417 4.68232L4.65048 4.55003L4.97952 4.9268C4.97264 4.90113 4.968 4.87485 4.96357 4.84978C4.95953 4.82689 4.95566 4.80499 4.95043 4.78546L4.87731 4.34889L5.06759 4.17509L5.13487 4.75359L5.82346 4.99893L5.63916 5.16235L5.11984 4.95938L5.13257 5.1051ZM6.24667 4.25391C6.41347 4.51626 6.31219 4.72762 6.16166 4.82059C5.98277 4.9387 5.7682 4.89092 5.63094 4.6733C5.47292 4.44369 5.52888 4.22694 5.71596 4.10663C5.90084 3.97814 6.1138 4.05266 6.24667 4.25391ZM6.06998 4.38021C5.99616 4.2684 5.89399 4.18174 5.79636 4.24299C5.69054 4.30643 5.73601 4.44338 5.80983 4.55519C5.88804 4.68336 6.00219 4.74927 6.08345 4.69241C6.16252 4.62736 6.14819 4.50838 6.06998 4.38021ZM4.33857 6.16878L4.53152 6.3978L4.38874 6.58518L3.67861 5.67014L3.83937 5.45161L4.92933 5.85258L4.79472 6.03778L4.51131 5.9295L4.33857 6.16878ZM3.89639 5.66441C3.95267 5.71074 4.01552 5.78163 4.05543 5.83234L4.21944 6.05157L4.36003 5.85599L4.11374 5.75531C4.05868 5.74082 3.98617 5.70664 3.92876 5.67958C3.91728 5.67417 3.9064 5.66904 3.89639 5.66441ZM7.64381 4.09886C7.59529 4.14695 7.50146 4.18964 7.41362 4.22195C7.18065 4.30192 6.99384 4.19407 6.8975 3.96549C6.82791 3.7385 6.88987 3.51136 7.11465 3.43359C7.30071 3.37496 7.46676 3.47083 7.54892 3.71199L7.57085 3.79383L7.12127 3.94939C7.17273 4.07596 7.27593 4.10094 7.38832 4.06205C7.46198 4.04231 7.52307 4.0084 7.5656 3.97069L7.64381 4.09886ZM6.76819 4.46507L6.57454 4.56082L6.33816 4.0715C6.29767 3.98585 6.25936 3.90839 6.22545 3.8473L6.38856 3.7685L6.45638 3.89069L6.46457 3.88849C6.45024 3.76952 6.51454 3.68211 6.57783 3.65638C6.592 3.64381 6.60019 3.64162 6.61656 3.63723L6.70193 3.82489L6.65282 3.83805C6.56717 3.87855 6.52962 3.96756 6.58926 4.09194L6.76819 4.46507ZM4.92421 14.3457L5.26605 14.0172L5.39994 14.1568L4.98722 14.5481C4.93973 14.6108 4.8933 14.6558 4.85149 14.6964C4.84197 14.7056 4.83268 14.7146 4.82368 14.7235L4.70016 14.5899L4.76666 14.5107C4.70118 14.5282 4.5898 14.5055 4.51657 14.4286C4.416 14.3152 4.41146 14.1673 4.5712 14.0104L4.92722 13.6694L5.08187 13.8209L4.74821 14.1472C4.67952 14.2182 4.64796 14.2969 4.70862 14.3596C4.74634 14.4021 4.83316 14.4315 4.92421 14.3457ZM5.82661 14.4723C5.99544 14.6113 6.01753 14.8247 5.86276 15.0328C5.69981 15.2432 5.47604 15.2593 5.30122 15.1307C5.13239 14.9917 5.11849 14.7761 5.26726 14.5783C5.45637 14.3347 5.68293 14.3617 5.82661 14.4723ZM5.4339 14.7091C5.3636 14.8069 5.31246 14.9434 5.38949 15.0017C5.48947 15.0802 5.60507 14.9878 5.67756 14.8982C5.77022 14.7857 5.79681 14.6558 5.71978 14.5974C5.63237 14.5331 5.52655 14.5966 5.4339 14.7091ZM8.1938 3.92518C8.16004 3.99563 8.08697 4.0503 8.00293 4.06405C7.85121 4.08715 7.74684 3.9923 7.72652 3.88371C7.68806 3.6747 7.84839 3.55279 8.09832 3.50337C8.08457 3.41932 8.04466 3.36861 7.92788 3.39113C7.85422 3.41087 7.78495 3.44698 7.74242 3.48469L7.68058 3.35213C7.72311 3.31441 7.81475 3.26354 7.93971 3.23883C8.18146 3.1916 8.27223 3.33395 8.3101 3.50803L8.3683 3.7907L8.41655 3.97076L8.22391 4.00483L8.1938 3.92518ZM8.14555 3.74511L8.12303 3.62833C8.01224 3.64047 7.90204 3.68755 7.92675 3.81251C7.9383 3.88837 7.99019 3.91833 8.0393 3.90517C8.0906 3.90019 8.16587 3.85371 8.14555 3.74511ZM3.57015 7.1642C3.43657 7.28771 3.29362 7.34356 3.18166 7.28584C3.01181 7.20853 2.93682 7.02686 3.03371 6.79914C3.06687 6.69375 3.12957 6.63309 3.1721 6.59538L3.32397 6.70381C3.31912 6.70999 3.3133 6.71703 3.30678 6.72491C3.27812 6.75957 3.23593 6.81058 3.20355 6.87644C3.16818 6.97364 3.1983 7.0533 3.25618 7.07288C3.32444 7.09845 3.37735 7.06673 3.49076 6.96616C3.63252 6.84045 3.7553 6.80755 3.89182 6.8587C4.07204 6.94199 4.14104 7.13404 4.03816 7.37214C3.99681 7.47972 3.91395 7.56333 3.87142 7.60104L3.71955 7.49261C3.77026 7.4527 3.83676 7.37347 3.86832 7.29484C3.91187 7.19544 3.87956 7.10761 3.80911 7.07385C3.73267 7.05047 3.66938 7.0762 3.57015 7.1642ZM3.39422 6.11478L4.36536 6.66163L4.25751 6.84843L3.28856 6.30977L3.39422 6.11478ZM3.43927 8.18178L3.70691 8.32938L3.66731 8.54175L2.66884 7.95836L2.74058 7.70228L3.89934 7.67252L3.8352 7.89147L3.5208 7.89676L3.43927 8.18178ZM3.05967 7.97646L3.28799 8.10827L3.33956 7.87514L3.07647 7.87546C3.05148 7.87504 3.0204 7.87338 2.98762 7.87163C2.93948 7.86906 2.88768 7.8663 2.84612 7.867L2.84832 7.87518C2.89185 7.89149 2.94138 7.91689 2.98714 7.94036C3.01314 7.95369 3.03791 7.9664 3.05967 7.97646ZM8.13934 6.30833L9.58681 8.53467L12.1568 7.84603L10.4814 9.90908L11.9289 12.1354L9.44643 11.1865L7.77921 13.2473L7.9114 10.5977L5.43712 9.64657L8.00714 8.95794L8.13934 6.30833ZM12.5704 4.08587L12.1526 4.78557L11.9636 4.66954L12.3858 3.98621L12.5704 4.08587ZM12.641 3.75992C12.7011 3.78769 12.7126 3.86355 12.6827 3.91544C12.6527 3.96733 12.5872 3.98487 12.5272 3.95711C12.4671 3.92934 12.4555 3.85348 12.4855 3.80159C12.5133 3.74152 12.5891 3.72997 12.641 3.75992ZM12.5651 5.11367C12.3963 4.97469 12.3742 4.76129 12.529 4.55315C12.6919 4.34281 12.9135 4.31853 13.0905 4.45532C13.2593 4.59431 13.2732 4.80989 13.1245 5.00766C12.9354 5.25132 12.7088 5.2243 12.5651 5.11367ZM12.9556 4.86867C13.0259 4.77089 13.0711 4.64474 13 4.57606C12.9001 4.49758 12.7845 4.58996 12.712 4.67956C12.6193 4.79211 12.5927 4.92205 12.6698 4.98036C12.7572 5.04466 12.863 4.98122 12.9556 4.86867ZM13.4571 5.23432L13.1153 5.56277L12.9732 5.42539L13.3859 5.03409C13.4374 4.97279 13.483 4.92882 13.5235 4.88978C13.5353 4.87837 13.5467 4.86737 13.5577 4.85649L13.6812 4.99007L13.6147 5.06929C13.6802 5.05175 13.7916 5.07454 13.8648 5.15142C13.9654 5.26483 13.9699 5.41274 13.8102 5.56958L13.4541 5.9106L13.2995 5.75905L13.6331 5.43279C13.7018 5.36175 13.7334 5.28312 13.6727 5.22042C13.635 5.17789 13.5482 5.14852 13.4571 5.23432ZM11.7441 4.57046C11.5409 4.467 11.6242 4.28678 11.664 4.20595L11.8431 3.85968L11.7519 3.81394L11.8276 3.67084L11.9188 3.71658L11.9782 3.57787L12.1965 3.60708L12.099 3.79988L12.2607 3.87937L12.1872 4.03065L12.0255 3.95116L11.8725 4.2641C11.8372 4.3613 11.84 4.40442 11.9 4.43218C11.923 4.45235 11.9415 4.45615 11.9601 4.45995L11.8866 4.61123C11.8435 4.61401 11.796 4.60042 11.7441 4.57046ZM5.74254 15.8283C5.68247 15.8005 5.67091 15.7246 5.70087 15.6727C5.74501 15.6083 5.8023 15.5929 5.85638 15.6311C5.90827 15.661 5.92801 15.7347 5.89805 15.7866C5.86809 15.8385 5.79443 15.8582 5.74254 15.8283ZM10.2103 3.20063L10.4287 3.22985L10.0388 4.00102L9.8308 3.9778L9.66878 3.14397L9.89533 3.17099L9.95149 3.57702L9.9515 3.57709C9.96086 3.64474 9.97021 3.71239 9.97139 3.78223L9.97957 3.78003C10.0057 3.73471 10.0221 3.68737 10.0389 3.63863C10.0452 3.62042 10.0515 3.60201 10.0585 3.58344L10.2103 3.20063ZM10.8065 3.33037L10.6039 4.11279L10.3975 4.06282L10.5919 3.2826L10.8065 3.33037ZM10.8187 3.93241C10.8894 3.73801 11.0902 3.70174 11.3343 3.79424C11.3577 3.7178 11.3505 3.65831 11.2615 3.62075C11.1933 3.59518 11.113 3.59037 11.0557 3.60572L11.0594 3.45561L11.0652 3.4557C11.127 3.45669 11.2215 3.45819 11.3416 3.49402C11.5753 3.58053 11.5783 3.75519 11.5255 3.91846L11.4254 4.19968C11.4058 4.25756 11.3825 4.33401 11.3771 4.37932L11.193 4.31458L11.1957 4.22616C11.1368 4.26826 11.0423 4.27601 10.9637 4.24445C10.825 4.18512 10.7817 4.05635 10.8187 3.93241ZM11.0765 4.10894C11.118 4.13291 11.2125 4.12516 11.2478 4.02796L11.2892 3.92038C11.1898 3.87683 11.0642 3.86661 11.0229 3.97419C10.9973 4.04245 11.029 4.09536 11.0765 4.10894ZM10.8543 3.1158C10.8495 3.19605 10.7862 3.22178 10.7097 3.1984C10.6437 3.18101 10.6076 3.11174 10.6271 3.05385C10.6445 2.98779 10.7056 2.95387 10.7717 2.97126C10.8378 2.98865 10.8717 3.04974 10.8543 3.1158ZM9.25916 3.84148C9.21502 3.90594 9.13756 3.94424 9.04913 3.94162C8.9094 3.94397 8.80883 3.83056 8.80049 3.70121C8.80515 3.48942 8.99062 3.39586 9.24552 3.39774C9.23996 3.3115 9.21423 3.24822 9.09306 3.25437C9.0232 3.25555 8.94954 3.27528 8.89663 3.307L8.85935 3.16786C8.90407 3.13833 9.0001 3.10383 9.13164 3.10368C9.38435 3.09737 9.44677 3.26486 9.44971 3.43953L9.44842 3.72936L9.44842 3.72939C9.4496 3.79924 9.45077 3.8691 9.46393 3.9182L9.27071 3.91734L9.25916 3.84148ZM9.25606 3.53528C9.14088 3.53105 9.0263 3.56175 9.02207 3.67692C9.02544 3.75497 9.06914 3.78713 9.12264 3.79034C9.17832 3.80173 9.26178 3.75305 9.26221 3.65644L9.25606 3.53528ZM7.52706 16.4642C7.54445 16.3981 7.60335 16.356 7.66343 16.3838C7.72949 16.4012 7.7656 16.4705 7.74602 16.5283C7.73682 16.5922 7.67572 16.6261 7.60966 16.6087C7.54359 16.5914 7.50968 16.5303 7.52706 16.4642ZM14.051 13.409L13.858 13.18L14.0008 12.9926L14.7109 13.9077L14.5502 14.1262L13.4602 13.7252L13.5948 13.54L13.8782 13.6483L14.051 13.409ZM14.4931 13.9134C14.4369 13.8671 14.374 13.7962 14.3341 13.7455L14.1701 13.5262L14.0295 13.7218L14.2758 13.8225C14.3309 13.837 14.4034 13.8712 14.4608 13.8982C14.4723 13.9036 14.4831 13.9088 14.4931 13.9134ZM13.257 14.4727L13.0034 14.181L13.1719 14.0569L13.9136 14.8933L13.7472 15.0256L13.4182 14.6488L13.41 14.651C13.4169 14.6767 13.4215 14.7029 13.426 14.728C13.43 14.7509 13.4339 14.7728 13.4391 14.7923L13.5122 15.2289L13.3219 15.4027L13.2547 14.8242L12.5661 14.5789L12.7504 14.4155L13.2697 14.6184L13.257 14.4727ZM9.12001 15.7303C9.16633 15.6741 9.2438 15.6358 9.33222 15.6384C9.48832 15.6316 9.57252 15.7494 9.57867 15.8706C9.57182 16.0742 9.38854 16.176 9.13364 16.1741C9.13701 16.2521 9.16273 16.3154 9.2839 16.3093C9.35376 16.3081 9.42743 16.2883 9.48034 16.2566L9.51762 16.3958C9.46471 16.4275 9.37687 16.4598 9.24533 16.46C8.99043 16.4581 8.93019 16.2988 8.92725 16.1241L8.92855 15.8343L8.92855 15.8342C8.92737 15.7644 8.92619 15.6945 8.91304 15.6454L9.10626 15.6463L9.12001 15.7303ZM9.13348 16.0425C9.24866 16.0468 9.36324 16.0161 9.36747 15.9009C9.3641 15.8228 9.3204 15.7907 9.2669 15.7875C9.21121 15.7761 9.12776 15.8247 9.12733 15.9214L9.13348 16.0425ZM14.9953 13.463L14.0242 12.9162L14.132 12.7294L15.1032 13.2762L14.9953 13.463ZM12.1451 15.3321C11.9701 15.0719 12.0795 14.8584 12.2301 14.7654C12.4068 14.6391 12.6213 14.6869 12.7608 14.9127C12.9188 15.1423 12.8628 15.3591 12.6758 15.4794C12.4909 15.6078 12.2697 15.5355 12.1451 15.3321ZM12.3196 15.1976C12.3934 15.3094 12.4956 15.3961 12.5932 15.3348C12.6908 15.2736 12.6453 15.1366 12.5797 15.0226C12.5015 14.8944 12.3873 14.8285 12.3061 14.8854C12.227 14.9504 12.2435 15.0776 12.3196 15.1976ZM14.8216 12.4218C14.953 12.2901 15.0877 12.2364 15.2101 12.3001C15.3881 12.3753 15.4571 12.5673 15.358 12.7869C15.3249 12.8922 15.2622 12.9529 15.2196 12.9906L15.0678 12.8822C15.0961 12.857 15.1588 12.7964 15.1904 12.7177C15.2257 12.6205 15.1956 12.5409 15.1377 12.5213C15.0673 12.4875 15.0144 12.5193 14.901 12.6198C14.7614 12.7537 14.6364 12.7784 14.4999 12.7273C14.3197 12.644 14.2507 12.4519 14.3536 12.2138C14.3949 12.1063 14.4778 12.0227 14.5203 11.9849L14.6722 12.0934C14.6215 12.1333 14.555 12.2125 14.5234 12.2911C14.4821 12.3987 14.5122 12.4784 14.5826 12.5121C14.6509 12.5377 14.7223 12.5098 14.8216 12.4218ZM14.8605 11.6832L14.9421 11.3982L14.6744 11.2506L14.7326 11.042L15.7289 11.6172L15.6571 11.8733L14.4984 11.9031L14.5625 11.6841L14.8605 11.6832ZM15.3299 11.6013L15.1015 11.4695L15.0396 11.6967L15.3027 11.6964C15.3666 11.7056 15.4632 11.706 15.533 11.7048C15.503 11.6909 15.4672 11.672 15.4315 11.6531C15.3957 11.6342 15.3599 11.6152 15.3299 11.6013ZM10.1957 15.6526C10.2295 15.5822 10.3026 15.5275 10.3866 15.5138C10.5301 15.4928 10.6427 15.5855 10.6652 15.7023C10.7037 15.9113 10.5433 16.0332 10.2934 16.0826C10.3072 16.1667 10.3471 16.2174 10.4638 16.1949C10.5293 16.1773 10.6068 16.139 10.6493 16.1013L10.7112 16.2339C10.6686 16.2716 10.577 16.3224 10.452 16.3472C10.2103 16.3944 10.1195 16.252 10.0816 16.078L10.0234 15.7953L9.97299 15.607L10.1656 15.573L10.1957 15.6526ZM10.2462 15.8409L10.2687 15.9577C10.3751 15.9291 10.4957 15.8881 10.465 15.7735C10.4534 15.6976 10.4015 15.6677 10.3524 15.6808C10.3011 15.6858 10.2302 15.7487 10.2462 15.8409ZM7.59121 16.2452L7.78568 15.465L7.99207 15.515L7.7976 16.2952L7.59121 16.2452ZM11.6132 15.1149L11.8068 15.0192L12.0432 15.5085C12.0837 15.5941 12.122 15.6716 12.1559 15.7327L11.9928 15.8115L11.925 15.6893L11.9168 15.6915C11.9311 15.8105 11.8668 15.8979 11.8035 15.9236C11.7894 15.9362 11.7812 15.9384 11.7648 15.9428L11.6794 15.7551L11.7285 15.7419C11.8142 15.7015 11.8517 15.6124 11.7921 15.4881L11.6132 15.1149ZM5.8169 15.4838L6.23691 14.7922L6.42591 14.9083L6.0059 15.5998L5.8169 15.4838ZM6.64545 15.0073C6.84862 15.1108 6.76532 15.291 6.72557 15.3719L6.5524 15.7077L6.64361 15.7535L6.56792 15.8966L6.4767 15.8508L6.41738 15.9896L6.19901 15.9603L6.29648 15.7675L6.13482 15.6881L6.20833 15.5368L6.36999 15.6163L6.52299 15.3033C6.56055 15.2143 6.55557 15.163 6.4955 15.1352C6.46656 15.1255 6.448 15.1217 6.42943 15.1179L6.50294 14.9666C6.54605 14.9638 6.59356 14.9774 6.64545 15.0073ZM10.7457 15.4789C10.7942 15.4309 10.8881 15.3882 10.9759 15.3559C11.2089 15.2759 11.3957 15.3837 11.4779 15.6249C11.5534 15.8415 11.4915 16.0686 11.2667 16.1464C11.0806 16.205 10.9146 16.1092 10.8324 15.868L10.8105 15.7862L11.2601 15.6306C11.2086 15.504 11.1054 15.4791 10.993 15.5179C10.9194 15.5377 10.8583 15.5716 10.8157 15.6093L10.7457 15.4789ZM11.036 15.8749C11.0662 15.9545 11.1252 16.044 11.2294 16.0073C11.3233 15.9646 11.3275 15.8494 11.3099 15.7839L11.036 15.8749ZM8.18142 16.3854L7.96306 16.3561L8.34096 15.6057L8.55494 15.6186L8.71696 16.4524L8.49041 16.4254L8.43425 16.0193C8.43287 16.0079 8.43132 15.9958 8.42972 15.9833C8.42302 15.9309 8.4153 15.8706 8.41435 15.8141C8.38818 15.8595 8.37185 15.9068 8.35504 15.9555C8.34875 15.9738 8.3424 15.9922 8.33544 16.0107L8.18142 16.3854ZM7.57304 15.6536C7.50231 15.848 7.30149 15.8842 7.05739 15.7917C7.03182 15.86 7.04338 15.9359 7.14058 15.9712C7.20884 15.9968 7.28908 16.0016 7.34637 15.9863L7.34273 16.1364L7.33695 16.1363C7.27509 16.1353 7.18063 16.1338 7.06049 16.098C6.82678 16.0114 6.82383 15.8368 6.87658 15.6735L6.97668 15.3923C6.99626 15.3344 7.01964 15.258 7.02504 15.2127L7.20906 15.2774L7.19607 15.3598C7.25496 15.3177 7.34938 15.31 7.42802 15.3415C7.56673 15.4009 7.61 15.5296 7.57304 15.6536ZM7.32119 15.4667C7.27149 15.4449 7.17707 15.4526 7.14171 15.5498L7.10854 15.6552C7.21612 15.6966 7.33349 15.709 7.37484 15.6014C7.40041 15.5332 7.36869 15.4803 7.32119 15.4667Z'
            fill='#F7544A'
        />
    </svg>
)

export const UnionIcon: React.FC = (props: any) => {
    return <Icon component={UnionIconSvg} {...props} />
}

const CloseIconIconSvg = () => (
    <svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'>
        <path
            d='M9.375 2.625L2.625 9.375'
            stroke='currentColor'
            strokeWidth='1.5'
            strokeLinecap='round'
            strokeLinejoin='round'
        />
        <path
            d='M9.375 9.375L2.625 2.625'
            stroke='currentColor'
            strokeWidth='1.5'
            strokeLinecap='round'
            strokeLinejoin='round'
        />
    </svg>
)

export const CloseIcon: React.FC = (props: any) => {
    return <Icon component={CloseIconIconSvg} {...props} />
}
